;; flags
(define IMG_INIT_JPG #x00000001)	;无符号类型要这样定义
(define IMG_INIT_PNG #x00000002)
(define IMG_INIT_TIF #x00000004)
(define IMG_INIT_EVERYTHING #x00000007)	;通过上面三项  或运算 得到
(define IMG_MAJOR_VERSION 1)
(define IMG_MINOR_VERSION 2)
(define IMG_PATCHLEVEL 8)


(define-sdl-func (* SDL_version) IMG_Linked_Version () "IMG_Linked_Version")
(define-sdl-func int IMG_Init ((flags int)) "IMG_Init")
(define-sdl-func void IMG_Quit () "IMG_Quit")
(define-sdl-func (* SDL_Surface) IMG_LoadTyped_RW ((src (* SDL_RWops)) (freesrc int) (type string)) "IMG_LoadTyped_RW")
(define-sdl-func (* SDL_Surface) IMG_Load ((file string)) "IMG_Load")
(define-sdl-func (* SDL_Surface) IMG_Load_RW ((src (* SDL_RWops)) (freesrc int)) "IMG_Load_RW")
(define-sdl-func (* SDL_Texture) IMG_LoadTexture ((renderer (* SDL_Renderer)) (file string)) "IMG_LoadTexture") ;注意SDL 类型 * 参数名 和 类型 *参数名的不同,返回值问题 debug半天,一直报错 无效的外过程参数 void* 0 2022年7月19日
(define-sdl-func (* SDL_Texture) IMG_LoadTexture_RW ((renderer (* SDL_Renderer)) (src (* SDL_RWops)) (freesrc int)) "IMG_LoadTexture_RW")
(define-sdl-func (* SDL_Texture) IMG_LoadTextureTyped_RW ((renderer (* SDL_Renderer)) (src (* SDL_RWops)) (freesrc int) (type string)) "IMG_LoadTextureTyped_RW")
(define-sdl-func int IMG_isICO ((src (* SDL_RWops))) "IMG_isICO")
(define-sdl-func int IMG_isCUR ((src (* SDL_RWops))) "IMG_isCUR")
(define-sdl-func int IMG_isBMP ((src (* SDL_RWops))) "IMG_isBMP")
(define-sdl-func int IMG_isGIF ((src (* SDL_RWops))) "IMG_isGIF")
(define-sdl-func int IMG_isJPG ((src (* SDL_RWops))) "IMG_isJPG")
(define-sdl-func int IMG_isLBM ((src (* SDL_RWops))) "IMG_isLBM")
(define-sdl-func int IMG_isPCX ((src (* SDL_RWops))) "IMG_isPCX")
(define-sdl-func int IMG_isPNG ((src (* SDL_RWops))) "IMG_isPNG")
(define-sdl-func int IMG_isPNM ((src (* SDL_RWops))) "IMG_isPNM")
(define-sdl-func int IMG_isTIF ((src (* SDL_RWops))) "IMG_isTIF")
(define-sdl-func int IMG_isXCF ((src (* SDL_RWops))) "IMG_isXCF")
(define-sdl-func int IMG_isXPM ((src (* SDL_RWops))) "IMG_isXPM")
(define-sdl-func int IMG_isXV ((src (* SDL_RWops))) "IMG_isXV")
(define-sdl-func int IMG_isWEBP ((src (* SDL_RWops))) "IMG_isWEBP")
(define-sdl-func (* SDL_Surface) IMG_LoadICO_RW ((src (* SDL_RWops))) "IMG_LoadICO_RW")
(define-sdl-func (* SDL_Surface) IMG_LoadCUR_RW ((src (* SDL_RWops))) "IMG_LoadCUR_RW")
(define-sdl-func (* SDL_Surface) IMG_LoadBMP_RW ((src (* SDL_RWops))) "IMG_LoadBMP_RW")
(define-sdl-func (* SDL_Surface) IMG_LoadGIF_RW ((src (* SDL_RWops))) "IMG_LoadGIF_RW")
(define-sdl-func (* SDL_Surface) IMG_LoadJPG_RW ((src (* SDL_RWops))) "IMG_LoadJPG_RW")
(define-sdl-func (* SDL_Surface) IMG_LoadLBM_RW ((src (* SDL_RWops))) "IMG_LoadLBM_RW")
(define-sdl-func (* SDL_Surface) IMG_LoadPCX_RW ((src (* SDL_RWops))) "IMG_LoadPCX_RW")
(define-sdl-func (* SDL_Surface) IMG_LoadPNG_RW ((src (* SDL_RWops))) "IMG_LoadPNG_RW")
(define-sdl-func (* SDL_Surface) IMG_LoadPNM_RW ((src (* SDL_RWops))) "IMG_LoadPNM_RW")
(define-sdl-func (* SDL_Surface) IMG_LoadTGA_RW ((src (* SDL_RWops))) "IMG_LoadTGA_RW")
(define-sdl-func (* SDL_Surface) IMG_LoadTIF_RW ((src (* SDL_RWops))) "IMG_LoadTIF_RW")
(define-sdl-func (* SDL_Surface) IMG_LoadXCF_RW ((src (* SDL_RWops))) "IMG_LoadXCF_RW")
(define-sdl-func (* SDL_Surface) IMG_LoadXPM_RW ((src (* SDL_RWops))) "IMG_LoadXPM_RW")
(define-sdl-func (* SDL_Surface) IMG_LoadXV_RW ((src (* SDL_RWops))) "IMG_LoadXV_RW")
(define-sdl-func (* SDL_Surface) IMG_LoadWEBP_RW ((src (* SDL_RWops))) "IMG_LoadWEBP_RW")
(define-sdl-func (* SDL_Surface) IMG_ReadXPMFromArray ((xpm void*)) "IMG_ReadXPMFromArray")
(define-sdl-func int IMG_SavePNG ((surface (* SDL_Surface)) (file string)) "IMG_SavePNG")
(define-sdl-func int IMG_SavePNG_RW ((surface (* SDL_Surface)) (dst (* SDL_RWops)) (freedst int)) "IMG_SavePNG_RW")
